<?php

/**
 * @Author: Wang Chunsheng 2192138785@qq.com
 * @Date:   2020-03-11 16:42:29
 * @Last Modified by:   Wang Chunsheng 2192138785@qq.com
 * @Last Modified time: 2020-03-11 18:24:45
 */
use yii\helpers\Html;
use common\widgets\MyActiveForm;

/* @var $this yii\web\View */
/* @var $model app\modules\diandi_shop\models\DdShopAreas */
/* @var $form yii\widgets\MyActiveForm */
?>

<div class="dd-shop-areas-form">

    <?php $form = MyActiveForm::begin(); ?>

    <?= $form->field($model, 'area_name')->textInput(['maxlength' => true]); ?>


    <?= $form->field($model, 'address')->textInput(['maxlength' => true]); ?>

    <?= $form->field($model, 'logo')->hint('尺寸:100px*100px')->widget('common\widgets\webuploader\FileInput', []); ?>

    <?php echo $form->field($model, 'status')->radioList(['0' => '启用', '1' => '不启用']); ?>


    <?= $form->field($model, 'freight')->textInput(['maxlength' => true]); ?>

    <!--省份--> <?= $form->field($model, 'province_id')->dropDownList($Helper->courseCateMap(), [
                    'prompt' => ['text' => '一级分类', 'options' => ['value' => 0]],
                    'label' => '一级分类',
                    'id' => 'classsearch-cocate_id',
                ])->label('省份'); ?>

    <!--城市--><?= $form->field($model, 'city_id')->dropDownList($Helper->courseMap($model->city_id), [
                    // 'options' => ['5' => ['selected' => true]],
                    'prompt' => ['text' => '二级分类', 'options' => ['value' => 0]],

                    'id' => 'classsearch-course_id',
                ])->label('城市 '); ?>

    <!--区县--><?= $form->field($model, 'region_id')->dropDownList($Helper->courseMap($model->region_id), [
                    // 'options' => ['5' => ['selected' => true]],
                    'prompt' => ['text' => '三级分类', 'options' => ['value' => 0]],

                    'id' => 'classsearch-course2_id',
                ])->label('区县'); ?>


    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <?= Html::submitButton('保存', ['class' => 'btn btn-success']); ?>
        </div>
    </div>

    <?php MyActiveForm::end(); ?>

</div>